package com.example.dormmanage.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@ApiModel("宿舍实体类")
public class Room {
    @ApiModelProperty("宿舍id")
    @TableId
    private Integer roomId;

    @ApiModelProperty("楼宇id")
    private Integer buildingId;

    @ApiModelProperty("宿舍名称")
    private String roomName;

    @ApiModelProperty("宿舍状态(0为空,1为未满,2为满)")
    private Integer status;

    @ApiModelProperty("宿舍所在楼层号")
    private Integer floor;

    @ApiModelProperty("已分配床位数")
    private Integer usedBeds;

    @ApiModelProperty("宿舍床位总数")
    private Integer beds;

    @ApiModelProperty("宿舍床位规格")
    private String bedFormat;

    @ApiModelProperty("宿舍类型(男寝或女寝)")
    private String type;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT,select = false)
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE,select = false)
    private LocalDateTime updateTime;
}
